#include <iostream>
using namespace std;

int gcd(int a, int b)
{return b==0 ? a : gcd(b, a%b);}
int lcm(int a,int b)
{return a*b/gcd(a,b);}

int gcd_main()
{
	cout<< gcd(10, 10) <<endl; //10
	cout<< gcd(6, 12) <<endl; //6
	cout<< gcd(30, 36) <<endl;//6
	cout<< lcm(10, 10) <<endl; //10
	cout<< lcm(6, 12) <<endl; //12
	cout<< lcm(30, 36) <<endl;//180
}